/**
 * @author scylla
 * @version V1.0
 * @Project echo-java-base
 * @Title 序列号生成器
 * @Description *
 * @Package concurrent.mthread.bf
 * @Since 2021/8/13 5:03 下午
 */
package concurrent.mthread.bf;

public class SerialNumberGenerator {

    private static volatile int serialNumber = 0;

    public synchronized static int nextSerailNumber() {
        return serialNumber++;//非线程安全
    }
}
